# coding=utf-8
import turtle

turtle.speed(1)
turtle.screensize(600, 600, "#FFFFE5")
turtle.penup()
# 绘圆，圆心坐标（0,0），半径140,填充圆内颜色为墨绿色
turtle.goto(0, -140)
turtle.pendown()
turtle.pensize(10)
turtle.pencolor("#FD8703")
turtle.fillcolor("#006401")
turtle.begin_fill()
turtle.circle(140)
turtle.end_fill()
# 绘制书页，填充颜色为白色
turtle.penup()
turtle.fillcolor("white")
turtle.begin_fill()
turtle.goto(0, -115)
turtle.pendown()
turtle.pensize(1)
turtle.pencolor("white")
turtle.goto(-90, -55)
turtle.goto(-115, -1)
turtle.goto(0, -45)
turtle.goto(115, -1)
turtle.goto(90, -55)
turtle.goto(0, -115)
turtle.end_fill()
# 绘制书页内框
turtle.penup()
turtle.goto(0, -105)
turtle.pendown()
turtle.pensize(5)
turtle.pencolor("#FD8703")
turtle.goto(-80, -50)
turtle.goto(-100, -15)
turtle.goto(0, -55)
turtle.goto(100, -15)
turtle.goto(80, -50)
turtle.goto(0, -105)
# 绘制笔
turtle.pensize(5)
turtle.goto(0, -120)
turtle.goto(0, -35)
# 绘制太阳，
turtle.penup()
turtle.goto(40, 0)
turtle.left(90)
turtle.pendown()
turtle.pensize(12)
turtle.pencolor("#FD8703")
turtle.circle(40, 180)
# 绘制太阳光芒
turtle.penup()
turtle.goto(60, 10)
turtle.left(190)
turtle.pendown()
turtle.pensize(12)
turtle.pencolor("#FD8703")
turtle.circle(60, 160)
# 字母A1坐标
la1 = [(-102.5, 51.5), (-93.5, 38), (-93, 35), (-92.5, 35), (-90.5, 40), (-91, 40), (-92.5, 39), (-95, 42.5),
       (-92.5, 47),
       (-88.5, 46), (-88, 46), (-85, 49.5), (-86, 49.5), (-86.5, 48.5), (-102.5, 51.5)]
la1t = [(-95.5, 43.5), (-99, 48.5), (-94, 47), (-95.5, 43.5)]
# 字母N1坐标
ln1 = [(-96, 61), (-96.5, 61.5), (-94, 66), (-81, 65.5), (-87.5, 72), (-89.5, 71), (-90, 71.5), (-86, 76),
       (-85.5, 75.5), (-86.5, 73.5),
       (-76, 62), (-91, 63), (-82, 55.5), (-81, 57), (-80.5, 56), (-83.5, 52), (-84, 52), (-83.5, 54), (-94, 63),
       (-95, 63), (-96, 61)]
# 字母Y坐标
ly = [(-55, 101.5), (-49.2, 104.5), (-49.8, 103.5), (-50, 103), (-45, 97.5), (-44, 106), (-45.5, 105.5), (-46, 106),
      (-41, 108),
      (-41, 107), (-42.5, 106), (-44, 96), (-41.5, 90), (-40, 90.5), (-39.5, 90), (-44.5, 87.5), (-45, 88.5),
      (-43.5, 89.5), (-46, 95.5),
      (-52.5, 101), (-54.5, 101), (-55, 101.5)]
# 字母A2坐标
la2 = [(-34, 93.5), (-34, 93), (-30, 93.5), (-30, 94.5), (-31.5, 94.5), (-31.5, 99.5),
       (-27, 100.5), (-25, 96), (-26, 95.5), (-26, 95), (-21, 96.5), (-21, 97), (-22, 97),
       (-31.5, 112), (-32.5, 95), (-33, 94), (-34, 93.5)]
la2t = [(-31, 106), (-31.5, 100.5), (-27.5, 101.5), (-31, 106)]
# 字母N2坐标
ln2 = [(-21.5, 113.5), (-17.5, 114.5), (-9, 104), (-10, 114.5), (-11.5, 114.5), (-11.5, 115.5), (-6.5, 115.5),
       (-6.5, 115),
       (-7.5, 115), (-8.5, 114.5), (-7.5, 98.5), (-17.5, 111.5), (-15.5, 98), (-14.5, 98), (-14.5, 97.5), (-18.5, 96.5),
       (-18.5, 97.5),
       (-17.5, 98), (-19.5, 113.5), (-21.5, 113), (-21.5, 113.5)]
# 字母G坐标
lg = [(9, 116), (8, 116), (8, 114.8), (7, 114.8), (5.5, 116), (1, 116), (0, 115.5), (-2, 113.5), (-2.5, 112.5),
      (-3, 112), (-3.5, 110.5), (-3.5, 104), (-3, 103), (-2.5, 102), (-2, 101), (-0.5, 99), (1, 98), (6, 98),
      (6.5, 98.5), (8, 99.5), (8, 103), (9, 105), (10, 105), (10, 106), (5, 106), (5, 105), (6.5, 105), (6.5, 100.5),
      (5, 99), (2, 99), (0.5, 101.5), (-0.5, 103.5), (-0, 104), (-0, 110.5), (2, 115), (5, 115), (7, 113), (7.5, 111.5),
      (7.5, 110), (9, 110), (9, 116)]
# 字母X坐标
lx = [(47.5, 105), (53, 102), (53, 101.5), (51, 101.5), (51.5, 95.5), (56.5, 98.5), (55.5, 99.5), (56.5, 100.5),
      (60.5, 97.5),
      (60, 96.5), (58, 97.5), (51.5, 94), (51.5, 84), (52.5, 83), (52, 82.5), (47.5, 85), (47.5, 86), (49, 86),
      (49, 92.5), (44, 89),
      (44.5, 88), (44, 87), (40.5, 89), (40.5, 89.5), (43, 89.5), (49, 93.5), (48.5, 102.5), (47, 104), (47.5, 105)]
# 字母I坐标
li = [(65.5, 94.5), (73, 83), (72.5, 87.5), (69.5, 89.5), (61.5, 77), (63.5, 75), (62.5, 74.5), (56.5, 79.5), (57, 80),
      (59, 78.5),
      (67.5, 91), (64.5, 93.5), (65, 94.5)]
# 字母A3坐标
la3 = [(66.5, 71.5), (66.5, 70.5), (70, 68), (69.5, 70), (73, 72), (76, 69), (73.5, 64.5), (73, 65), (72.5, 64.5),
       (76, 60), (76.5, 61),
       (76, 63), (83, 78), (69, 71), (66.5, 71.5)]
la3t = [(79, 75), (74, 72.5), (76.5, 69.5), (79, 75)]
# 字母N3坐标
ln3 = [(89.5, 69.5), (92.5, 66), (90, 52), (96, 57), (96, 59.5), (96.5, 59.5), (99.5, 55.5), (98.5, 54.5), (97, 56),
       (85, 47), (89.5, 63.5),
       (80.5, 56), (81.5, 54.5), (80.5, 54), (78, 58), (79, 58), (80, 57.5), (90, 67), (89, 69), (89.5, 69.5)]


# 绘制字母的函数
def zimu1(letter1):
    turtle.penup()
    turtle.goto(letter1[0])
    turtle.pendown()
    turtle.fillcolor('white')
    turtle.begin_fill()
    for x, y in letter1:
        zb = (x, y)
        turtle.pensize(1)
        turtle.pencolor('white')
        turtle.goto(zb)
    turtle.end_fill()


# 绘制字母A的函数
def zimu2(letter2):
    turtle.penup()
    turtle.goto(letter2[0])
    turtle.pendown()
    turtle.fillcolor('#006401')
    turtle.begin_fill()
    for x, y in letter2:
        zb = (x, y)
        turtle.pensize(1)
        turtle.pencolor('white')
        turtle.goto(zb)
    turtle.end_fill()


# 开始绘制字母
zimu1(la1)
zimu2(la1t)
zimu1(ln1)
zimu1(ly)
zimu1(la2)
zimu2(la2t)
zimu1(ln2)
zimu1(lg)
zimu1(lx)
zimu1(li)
zimu1(la3)
zimu2(la3t)
zimu1(ln3)
turtle.penup()
turtle.pencolor('#006401')
turtle.goto(-300, -230)
turtle.write('安阳县第二高级中学校徽', font=('宋体', 40,))
turtle.hideturtle()
turtle.done()
